<?php
$id = $_GET['id'];
$shopcode = 'shop' . $id;
if (isset(Yii::app()->request->cookies[$shopcode]->value)) {
    $shoparry = Yii::app()->request->cookies[$shopcode]->value;
    $savedCardArray = json_decode($shoparry, true);
}
?>
<div id="sliderFrame">
    <div id="slider">
        <?php
        $slider = ShopSlider::model()->findAll(array(
            'condition' => 'flag=1 and shopid='.$savedCardArray[0],
            'order' => 'id DESC',
            'limit' => 100,
        ));
        if (!empty($slider)) {
            foreach ($slider as $item) {
                if ($item->type < 1) {
                    ?>

        <a href="<?php echo $item->url ?>" target="_blank">
                        <div class="slider_letf">
                            <img src="<?php echo Yii::app()->request->baseUrl . '/uploadshop/slider/' . $item->photo; ?>" />
                        </div>
                        <div class="slider_right">
                            <div class="content_slide">
                                <div class="title_slide">
                                    <?php echo $item->title ?>
                                </div>
                                <p>
                                    <?php echo $item->small_content ?>
                                </p>
                            </div>

                        </div>
                    </a>
                    <?php
                } else {
                    ?>
                    <a class="video" href="<?php echo $item->url ?>" autoPlayVideo="false">

                        <img src="<?php echo Yii::app()->request->baseUrl . '/uploadshop/slider/' . $item->photo; ?>" alt="<?php echo $item->title ?>"/>




                    </a>
                    <?php
                }
            }
        }
        ?>

    </div>
    
         <div class="group1-Wrapper">
            <a onclick="imageSlider.previous()" class="group1-Prev"></a>
            <a onclick="imageSlider.next()" class="group1-Next"></a>
        </div>
</div>


